<!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]>      <html class="no-js"> <!--<![endif]-->
<html>

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>./vue.js</title>
  <meta name="description" content="">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="">
</head>

<body>
  <!--[if lt IE 7]>
      <p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="#">upgrade your browser</a> to improve your experience.</p>
    <![endif]-->
  <!-- <div id="app">
    <h1>{{counter}}</h1>
  </div> -->
  <div id="app">
    <p @click="add">{{counter}}</p>
    <p v-text="counter"></p>
    <p v-html="desc"></p>
    <input v-model="counter" />
  </div>
  <script src="./vue.js"></script>
  <script>
    const app = new Vue({
      el: "#app",
      data: {
        counter: 1,
        desc: "<div>继续<span style='color: red'>加油</span></div"
      },
      methods: {
        add: function name(params) {
          this.counter++
        }
      }
    })
    // setInterval(() => {
    //   app.counter++
    // }, 1000);
  </script>
</body>

</html>